package org.liuqm.service.impl;

import org.liuqm.config.MybatisUtil;
import org.liuqm.mapper.AuctionMapper;
import org.liuqm.mapper.AuctionuserMapper;
import org.liuqm.pojo.Auction;
import org.liuqm.service.IAuctionService;

import java.util.List;

public class AuctionServiceImpl implements IAuctionService {


    AuctionMapper auctionMapper= MybatisUtil.openSession(true).getMapper(AuctionMapper.class);

    @Override
    public int addAuction(Auction auction) {
        return auctionMapper.addAuction(auction);
    }

    @Override
    public int deleteAuction(int id) {
        return auctionMapper.deleteAuction(id);
    }

    @Override
    public int updateAuction(Auction auction) {
        return auctionMapper.updateAuction(auction);
    }

    @Override
    public List<Auction> getAuctions(Auction auction) {
        return auctionMapper.getAuctions(auction);
    }

    @Override
    public Auction getAuctionById(Integer id) {
        return auctionMapper.getAuctionById(id);
    }
}
